In electric industry, providing more functions in a single chip under a limit space and limit number of pins is an important issue. Therefore, how to design a chip with some specific pins having multiple functions is a big challenge to chip designers.
In a controlling chip of an optical drive, there are two pins function for detecting the position of a tray of the optical drive, wherein one is called detect-tray-in-switch pin which is for determining whether the tray is moved at a complete-tray-in position or not; the other is called detect-tray-out-switch pin which is for determining whether the tray is moved at a complete-tray-out position or not. In another word, the tray will be moved to the complete-tray-in position through the driving of a tray motor if simultaneously the tray is at the complete-tray-out position and an eject button of the optical drive is pressed by user. Accordingly, the tray will be moved to the complete-tray-out position through the driving of the tray motor if simultaneously the tray is at the complete-tray-in position and the eject button is pressed by user. The tray motor is controlled to stop driving when the tray is at the complete-tray-in position or the complete-tray-out position. The above-mentioned movement of a tray of an optical drive is defined as a tray-in/tray-out action.
FIG. 1 is a diagram showing a limit switch circuit for detecting the position of a tray of an optical drive in prior art. The limit switch circuit comprises: a controlling chip 10, a tray 12, and a first limit switch 14. The controlling chip 10 further comprises a servo controlling unit 102, a detect-tray-in-switch pin 104, and a detect-tray-out-switch pin 106. The detect-tray-in-switch pin 104 is coupled to a voltage source (Vcc) through a resistance (R1); the detect-tray-out-switch pin 106 is coupled to the voltage source (Vcc) through a resistance (R2); and the first limit switch 14 is coupled to the detect-tray-in-switch pin 104, the detect-tray-out-switch pin 106, and a ground (GND). According to the position of the tray 12, the first limit switch 14 serves to connect the detect-tray-in-switch pin 104 to the ground (GND), to connect the detect-tray-out-switch pin 106 to the ground (GND), or to disconnect both the detect-tray-in-switch pin 104 and the detect-tray-out-switch pin 106 to the ground (GND). The main function of the limit switch circuit is for detecting the position of the tray 12 and further controlling a tray motor according to the position of the tray 12. The tray 12 is designed to mechanically trigger the first limit switch 14 when the tray 12 is moved to the complete-tray-in position or the complete-tray-out position after the optical drive executing the tray-in/tray-out action. When the first limit switch 14 is triggered, signals received by the detect-tray-in-switch pin 104 and the detect-tray-out-switch pin 106 can be detected by the controlling chip 10 to determine the position of the tray 12, and then further controls the driving of the tray motor.
For example, when the optical drive is executing the tray-in/tray-out action but before the tray 12 reaching the complete-tray-in position or the complete-tray-out position, the first limit switch 14 disconnects both the detect-tray-in-switch pin 104 and the detect-tray-out-switch pin 106 to the ground (GND). Therefore, both the detect-tray-in-switch pin 104 and the detect-tray-out-switch pin 106 receive a high-level signal (Vcc) to the servo controlling unit 102. In another word, when the servo controlling unit 102 detects that both the detect-tray-in-switch pin 104 and the detect-tray-out-switch pin 106 receive a high level signal, the controlling chip 10 can determine the optical drive is executing the tray-in/tray-out action, but the tray 12 is not yet reaching the complete-tray-in position or the complete-tray-out position.
FIG. 2 is a diagram showing the limit switch circuit when the tray 12 is at the complete-tray-in position. The tray 12 mechanically triggers the first limit switch 14 in response to the tray 12 being moved to the complete-tray-in position. The first limit switch 14 then connects the detect-tray-in-switch pin 104 to the ground (GND), so as the detect-tray-in-switch pin 104 receives a low-level signal (GND) and the detect-tray-out-switch pin 106 still receives a high-level signal. In another word, when the servo controlling unit 102 detects that the detect-tray-in-switch pin 104 receives a low-level signal and the detect-tray-out-switch pin 106 receives a high-level signal, the controlling chip 10 can determine that the tray 12 is at the complete-tray-in position. Accordingly, when the tray 12 stop mechanically triggering the first limit switch 14 after the tray 12 leaving the complete-tray-in position, the first limit switch 14 then disconnects the detect-tray-in-switch pin 104 to the ground (GND), so as the detect-tray-in-switch pin 104 receives a high-level signal changed from the low-level signal. In another word, when the servo controlling unit 102 detects that the signal received by the detect-tray-in-switch pin 104 is changed from the low-level signal to a high-level signal, the controlling chip 10 can determine the tray 12 has left the complete-tray-in position.
FIG. 3 is a diagram showing the limit switch circuit when the tray 12 is at the complete-tray-out position. The tray 12 mechanically triggers the first limit switch 14 in response to the tray 12 being moved to the complete-tray-out position. The first limit switch 14 then connects the detect-tray-out-switch pin 106 to the ground (GND), so as the detect-tray-out-switch pin 106 receives a low-level signal and the detect-tray-in-switch pin 104 still receives a high-level signal. In another word, when the servo controlling unit 102 detects that the detect-tray-out-switch pin 106 receives a low-level signal and the detect-tray-in-switch pin 104 receives a high-level signal, the controlling chip 10 can determine that the tray 12 is at the complete-tray-out position. Accordingly, when the tray 12 stop mechanically triggering the first limit switch 14 after the tray 12 leaving the complete-tray-out position, the first limit switch 14 then disconnects the detect-tray-out-switch pin 106 to the ground (GND), so as the detect-tray-out-switch pin 106 receives a high-level signal changed from the low-level signal. In another word, when the servo controlling unit 102 detects that the signal received by the detect-tray-out-switch pin 104 is changed from the low-level signal to a high-level signal, the controlling chip 10 can determine the tray 12 has left the complete-tray-out position.
The detect-tray-in-switch pin 104 and the detect-tray-out-switch pin 106 are on duty only when the controlling chip 10 is detecting the position of the tray 12 under the optical drive executing the tray-in/tray-out action. Out of the tray-in/tray-out action, the signals at the detect-tray-in-switch pin 104 and the detect-tray-out-switch pin 106 do not make any affection to the operation of the optical drive. In another word, the servo controlling unit 102 is at a “Don't care” state to the signals received by the detect-tray-in-switch pin 104 and the detect-tray-out-switch pin 106 when the optical drive does not execute the tray-in/tray-out action.
Moreover, the controlling chip 10 further comprises a detect-sled-limit-switch pin for detecting the position of a sled of the optical drive. FIG. 4 is a diagram showing a limit switch circuit for detecting the position of a sled of an optical drive. The detect-sled-limit-switch pin 108 is coupled to a voltage source (Vcc) through a resistance (R3). A second limit switch 18, coupled to the detect-sled-limit-switch pin 108 and the ground (GND), serves to connect the detect-sled-limit-switch pin 108 to the ground (GND) or not according to the position of the sled 16.
As known in the art, the sled 16 has to be moved to the most inner track of an optical disc when the tray 12, which is loaded with the optical disc, is at the complete-tray-in position. The position of the most inner track is defined as a sled-home position, and the process of moving the sled 16 to the sled-home position is defined as a move-sled-home action. As depicted in FIG. 4, the controlling chip 10 can determine the position of the sled 16 through the triggering of the second limit switch 18 when the optical drive is executing the move-sled-home action. For example, when the sled 16 mechanically triggers the second limit switch 18 in response to the sled 16 being moved to the move-sled-home position, the second limit switch 18 then connect the detect-sled-limit-switch pin 108 to the ground (GND), so as the detect-sled-limit-switch pin 108 receives a low-level signal changed from a high-level signal. When the servo controlling unit 102 determines that signal received by the detect-sled-limit-switch pin 108 is changed from the high-level signal to the low-level signal, the servo controlling unit 102 then stops driving the sled motor. In another word, when the sled 16 stop triggering the second limit switch 18 in response to the sled 16 leaving the move-sled-home position, servo controlling unit 102 determines that signal received by the detect-sled-limit-switch pin 108 is changed from the low-level signal to the high-level signal.
The detect-sled-limit-switch pin 108 is on duty only when the controlling chip 10 is detecting the position of the sled 16 under the optical drive executing the move-sled-home action. Out of the move-sled-home action, the signal at the detect-sled-limit-switch pin 108 does not make any affection to the operation of the optical drive. In another word, the servo controlling unit 102 is at a “Don't care” state to the signal received by the detect-sled-limit-switch pin 108 when the optical drive does not execute the move-sled-home action.
FIG. 5 is a diagram showing the signals at the detect-tray-in-switch pin, the detect-tray-out-switch pin, and the detect-sled-limit-switch pin during a process of an optical drive loading an optical disc in prior art. Before the time point t1, the tray 12 is at the complete-tray-out position and the user is ready to load an optical disc to an optical drive. At the complete-tray-out position, the detect-tray-in-switch pin 104 receives a high-level signal (Vcc) and the detect-tray-out-switch pin 106 receives a low-level signal (Gnd). Between the time point t1 and t2, the optical drive is executing the tray-in action. During execution of the tray-in action, the detect-tray-in-switch pin 104 receives a high-level signal (Vcc) and the detect-tray-out-switch pin 106 receives a high-level signal (Vcc). At the time point t2, the tray 12 is moved to the complete-tray-in position and the detect-tray-in-switch pin 104 receives a low-level signal (Gnd) and the detect-tray-out-switch pin 106 receives a high-level signal (Vcc). Therefore, the servo controlling unit 102 can determine the position of the tray 12 according to the signals at the detect-tray-in-switch pin 104 and the detect-tray-out-switch pin 106. In FIG. 5, the duration I refers to the time of the optical drive executing the tray-in/tray-out action. Out of the duration I, the servo controlling unit 102 is at a “Don't care” state to the signals at the detect-tray-in-switch pin 104 and the detect-tray-out-switch pin 106.
The optical drive must execute the move-sled-home action after the tray-in/tray-out action is finished. As depicted in FIG. 5, the duration II refers to the time of the optical drive executing the move-sled-home action. Between the time point t2 and t3, the sled 16 is moved to the move-sled-home position and the detect-sled-limit-switch pin 108 receives a high-level signal (Vcc) indicating that the sled 16 is not moved to the move-sled-home position. At the time point t3, the sled 16 is moved to the move-sled-home position and signal at the detect-sled-limit-switch pin 108 is changed from a high-level signal to a low-level signal (Gnd). At the time point t4, the move-sled-home action is finished in response to the sled 16 leaving the move-sled-home position, and the signal at the detect-sled-limit-switch pin 108 is changed from a low-level signal to a high-level signal (Vcc). Out of the move-sled-home action (duration II), the servo controlling unit 102 is at a “Don't care” state to the signal at the detect-sled-limit-switch pin 108.
Therefore, providing other appended functions to the optical drive when servo controlling unit 102 of the controlling chip 10 is at the “Don't care” state to signals at these three pins (the detect-tray-in-switch pin 104, the detect-tray-out-switch pin 106, and the detect-sled-limit-switch pin 108) is the purpose of the present invention.